#define _CRT_SECURE_NO_WARNINGS 1

#include"List.h"

void Test1()
{
	LTNode* plist = ListInit_2();

	ListPushFront(plist, 1);
	ListPushFront(plist, 2);
	ListPushFront(plist, 3);
	ListPushFront(plist, 4);
	ListPushFront(plist, 5);
	ListPrintf(plist);//5 4 3 2 1 

	ListPushBack(plist, 6);
	ListPushBack(plist, 7);
	ListPushBack(plist, 8);
	ListPushBack(plist, 9);
	ListPrintf(plist);// 5 4 3 2 1 6 7 8 9

	ListPopFront(plist);
	ListPopFront(plist);
	ListPrintf(plist);// 3 2 1 6 7 8 9

	ListPopBack(plist);
	ListPopBack(plist);
	ListPrintf(plist);// 3 2 1 6 7
	LTNode* pos = ListFind(plist, 1);
	if (pos != NULL)
	{
		ListInsrtt(plist, pos, 100);
	}
	ListPrintf(plist);// 3 2 100 1 6 7

	 pos = ListFind(plist, 6);
	if (pos != NULL)
	{
		ListInsrtt(plist, pos, 60);
	}
	ListPrintf(plist);// 3 2 100 1 60 6 7

	pos = ListFind(plist, 7);
	if (pos != NULL)
	{
		ListPopErase(plist, pos);
	}
	ListPrintf(plist);// 3 2 100 1 60 6


	ListDestroy(&plist);


}

int main()
{
	Test1();
	return 0;
}